/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session.stateless;

import entity.Inventory;
import entity.MaterialRequired;
import entity.Product;
import entity.RawMaterial;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Wx
 */
@Local
public interface ProductSessionBeanLocal {
    
    public void addInventoryRecord(Inventory i);
    
    public void updateRawMaterial(RawMaterial r);
    
    public RawMaterial getRawMaterialByName(String name, Long id);
    
    public void deleteRawMaterial(Long id);
    
    public void deleteProduct(String code);

    public void deleteProductMaterial(String code, Long id);

    public void updateProduct(Product p);

    public void updateProduct(String code, MaterialRequired materialRequired);

    public List<Product> getProducts();

    public Product getProductByName(String name, String code);
    
    public Product getProduct(String code);

    public Product getProduct(String code, String name);

    public void addProduct(Product product);

    public RawMaterial getRawMaterial(String name);

    public void addRawMaterial(RawMaterial rawMaterial);

    public RawMaterial getRawMaterial(Long id);

    public List<RawMaterial> getRawMaterials();
}
